import wx from 'weixin-js-sdk'

export class WxUtil {
  static isWxEnv () {
    return new Promise((resolve) => {
      wx.miniProgram.getEnv(function (res) {
        resolve(res.miniprogram)
      })
      setTimeout(() => {
        resolve(false)
      }, 3000)
    })
  }
}
